A computer virus is data which is programmed or inserted into a computer program to destroy a computer function. Also, the computer virus formed as a set of computer instructions or program codes can influence the normal use of a computer and be self-duplicated. The computer virus has features of destructibility, replicability and infectivity. When a file in a computer system is infected with a virus, the system is required to be scanned by an antivirus software to sweep the virus away. Since the transmissibility of the computer virus is strong, a run virus may attempt to infect other files in the system, thereby making it difficult to completely kill the virus in the system by the antivirus software.
In the prior art, when the antivirus software are scanning the computer virus, a rewritten file in the system can be obtained by a file system filter driver supported by a Windows system. Since the running of the antivirus software is based on the support of an antivirus engine, feature codes of various computer viruses are included in the antivirus engine. The feature codes are compared with the rewritten file. If the rewritten file includes the feature codes, it will be indicated that the rewritten file comprises the computer virus. Accordingly, virus codes in the file will be cleaned, or the whole file which is infected with a virus will be deleted. It has been found that, when the inventor researched the processing of the computer virus in the prior art, since the infectivity of current computer viruses is strong, files in which the virus have been cleaned during the scanning process of the antivirus software may be infected with a virus again very shortly. Therefore, it is difficult to effectively prevent the propagation of the virus in the system in the prior art, and the safety performance of the system is decreased.